import 'package:flutterproject/generated/json/base/json_field.dart';
import 'package:flutterproject/generated/json/logistics_track_bean.g.dart';
import 'dart:convert';

@JsonSerializable()
class LogisticsTrackBean {

	int? queryTimes;
	@JSONField(name: "upgrade_info")
	String? upgradeInfo;
	@JSONField(name: "fee_num")
	int? feeNum;
	int? status;
	String? expSpellName;
	String? msg;
	String? updateStr;
	List<dynamic>? possibleExpList;
	bool? flag;
	String? tel;
	@JSONField(name: "ret_code")
	int? retCode;
	String? logo;
	String? expTextName;
	List<LogisticsTrackData>? data;
	String? mailNo;
	int? dataSize;
	int? update;
  
  LogisticsTrackBean();

  factory LogisticsTrackBean.fromJson(Map<String, dynamic> json) => $LogisticsTrackBeanFromJson(json);

  Map<String, dynamic> toJson() => $LogisticsTrackBeanToJson(this);

  LogisticsTrackBean copyWith({int? queryTimes, String? upgradeInfo, int? feeNum, int? status, String? expSpellName, String? msg, String? updateStr, List<dynamic>? possibleExpList, bool? flag, String? tel, int? retCode, String? logo, String? expTextName, List<LogisticsTrackData>? data, String? mailNo, int? dataSize, int? update}) {
      return LogisticsTrackBean()..queryTimes= queryTimes ?? this.queryTimes
			..upgradeInfo= upgradeInfo ?? this.upgradeInfo
			..feeNum= feeNum ?? this.feeNum
			..status= status ?? this.status
			..expSpellName= expSpellName ?? this.expSpellName
			..msg= msg ?? this.msg
			..updateStr= updateStr ?? this.updateStr
			..possibleExpList= possibleExpList ?? this.possibleExpList
			..flag= flag ?? this.flag
			..tel= tel ?? this.tel
			..retCode= retCode ?? this.retCode
			..logo= logo ?? this.logo
			..expTextName= expTextName ?? this.expTextName
			..data= data ?? this.data
			..mailNo= mailNo ?? this.mailNo
			..dataSize= dataSize ?? this.dataSize
			..update= update ?? this.update;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class LogisticsTrackData {

	String? context;
	String? time;
  
  LogisticsTrackData();

  factory LogisticsTrackData.fromJson(Map<String, dynamic> json) => $LogisticsTrackDataFromJson(json);

  Map<String, dynamic> toJson() => $LogisticsTrackDataToJson(this);

  LogisticsTrackData copyWith({String? context, String? time}) {
      return LogisticsTrackData()..context= context ?? this.context
			..time= time ?? this.time;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}